Fixed issue where parent process wasnt set correctly