change code about reading map

fixed error