Fix last frame issue