Correcting in-correctly incrementation