Fix some issues with callbacks