fix up callbacks to be correctly bound