Fix conditions on path generator