corrected counter issue