fixed bug trying to dequeue element from empty list in computeNextInBackground() eventually crashing the program