Correct some bugs with maps and other