Stop the queue properly before trying to serialize them.