Fix issue #77 and issue #79
Merge pull request #83 from jDramaix/jd_fix_77_79

Fix issue #77 and issue #79