Fixed bug for map loading