fix for dequeue