Fixed bugs on map layers