fixed network pb

- close cursor quicker
- handle network errors
- failed API calls will be retried