Added sort for frames and chapters