possibly fixed bug in queue