fix cannot add fold twice bug