Hotfix/finally close npe

- finally close
- npe fix