fixed dequeuing