fixed warning of enums not handled