change comparation in array fetch
free queue->flags if malloc queue->data failed