Prevent GUI from crashing when invalid values were written in numeric fields. Includes basic validation. #1709