Fix cancelling on demand dialog