Small bugfix regarding reset of the frame counter