fix bug activity does not stop when network failed