Fixed a minor bug in ShortestFirst & added func of shortest time remaining.

Fixed a minor bug in ShortestFirst