fix issues
remove some logs
try to fix the buffer issue
refine buffer handling