revert changes to callback code