fix stack if queue is empty
Merge branch 'master' of https://github.com/shirou/pesand