Minimized creation of maps but did not properly check