fixed issues related to queue