fixing bug with map