Fixed a silly bug that caused cache frames to mix up.