- fix parse double with locale
- remove unused variables
- add some checks