Fixing the loading event for Leaflet.Loading plugin