[minor] support for canonical callbacks

This is just a tacked-on fashion of supporting them. To do this properly, a bit of a rewrite would be in order. However, this works, and is fairly unobtrusive. I'd be willing to work with you more if you don't like this style.