Fix bug with `end` frame.