Fixed gravity bug