Fix optimization for multiple frames.