Fix bug on mapping.

Thanks Olumuyiwa Taiwo for reporting.