set datapath correctly.