changed queue_destroy() to queue_free()