Fix path factory method.