Corrected dequeue issue