Fixed gravity settings dialog.

Fixed a dialog that asks for gravity to be input in case it has an invalid value.