finally,bugs fixed.