bug fixing to maps