correcting counter on skip when nan