Fixed most errors for maps