Improve callback handling.