Fix machine-dependent sample path bug