Fixed error in queue_clear