prediction sorting bugfixes