fixing gravity bug