Fixed map scaling at edges

Added logic to properly keep map from scaling awkwardly at edges