Fixed a ground detection problem