MAP-854, MAP-964: fix sort, restore footer