Fix scope for callbacks