Fixed validation on registration