Fix insertion of the counter