Fixed callback placement in code