fixed bug with queueing