Fixes for javascript
Numerical precision stuffs.