fix callback encode