fix enum generation bug