Set callbacks correctly