Fix callback handling