Fix path finding issue introduced by PR #470