tests and fix for callbacks