Fix bug when sorting extension is disabled