fix bugs when using lua string in TMemoryBuffer