fix ground detection