Generalized gravity and a ghost