bugfix: callbacks weren't working

I had a bug in the previous pull request