fix sort of legacy files a bit