fix sys.write bug, always declear length of every data