bug fix in mapper