Added some logic for handling ENUMs