Fixed a bug when creating/editing enums.