Fix to callback functions

fix to callback function call, removed deprecated call
Merge pull request #41 from tricksel/master

Fix to callback function calls