Tiny drawing patch

Added condition to check if the mouse's position is out of the map's
index.