bug fix in queue