Fix syntax error and make photo validation better