queue_remove was removing wrong item