Resolve bug when moving the map. Is not finished.