Compatibility fix when using -p PATH attribute, thanks @nstielau