fix bug for callback