fix q shutdown