Fixed context bug in mappings