Fixed bug with creating maps.