Fixed crash when attempting to add blocks outside the map.