Fix callback bugs