fix issue #90 and #91
Merge pull request #96 from jDramaix/jd_fix_91

fix issue #90 and #91
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