some changes to auto-unfolding