Fixed the previous frame bug.