fixes to callbacks.
Merge branch 'master' of github.com:shenghuahe/bath_hacked_mayden