Bug fix for callbacks