fixed buffer offset issue && string tests