fix guard (doesn't inherit cwd setting)