Added another cancellation check