fixed the cube counter