fixing issue with queue