Fixes an issue where plink doesn't exit with code 0