Fix purging of queues