fixing bug in pre/post paths