data preparation fix