Fixed bug in mapper