Add hook for cancelling transitions