Fixed bug when multiple frames are split