Some fixes of the minimal scheduling algorithm