fixes for backgrounding