fix empty queue scenario.
Merge pull request #34 from gcheng/emptyQueue

fix empty queue scenario.