Fix setting cancelled state