Fixed a bug with sorting of sections