Fixed bug in path maker functions