fix encoding handlecallback issue