bugfix for Sjfj and HEPTT algos