Upgrade from Leaflet 0.4 to 0.5

Fix crashes which were mentioned on Issue #5