fix datapreparation error