Fix use of ResultQueue pointer after the ResultQueue was already deleted