Fix: updating the position of a marker leads to a crash in leaflet