Set correct default if non legit value entered for min.
Safer save when no gateway exists
Corrected capitalization