On the Stability of a Class of Modified Gravitational Models