fix functions removing
fix counters