fix bad rounding on margin calculation and display
Merge pull request #1272 from altairis-fr/rounding

fix bad rounding on margin calculation and display