Small optimization to queue method.