Improved validation, fixed settings save error