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

fix issue #90 and #91