fixed some of the validation errors on main.php