Fixing setting of callback