Fix frameCounter