Fixed validation of enums