fixed bug in path builder, close #1490