removing path in bracket if there is a bye there