Fix some potential backgrounding issues.