some fixes for map creation