added line to free memory from last queue.