leaflet widget add counter modified, did not work correctly with ajax requests