fix callback creation