Improve enum handling.