fix a serious bug in memory operation!!!!!!!!!