Fix entity mappings