Fixed small bug with enums

Now the enum definitions won't be written multiple times