fixed bug background task

environment is now passed to child process fork