Fix bug in Enum mapping and warnings