Move the callback setting to __init__