fix hit counting and the counter managing URL allocation