Fix bad callback handling