fixing unfolding validness