fix unfolding script for data