fixed bug in mapper