Critical bug fix for mappings