Fix condition in addPath