Fix bug causing IndexError when instantiating a Map.