fix issue #90
fix issue #85
Merge pull request #99 from jDramaix/jd_fix_85

fix issue #85
Merge pull request #98 from jDramaix/jd_fix_91

fix issue #90