queue and stask bug fix