Fixed some bugs with enums.