fixed a bug where the a* expansion methods would run off of the edge of the map if there were no walls in the way.