fix bug in defualt_map and position_to_surface_index.