Fixes for nohup bug