Fixed an error in the queue implementation related to item removal.