Improved the EditFloatPreference to prevent invalid values.