Fix data preprocessing