Fixes for issues 8 and 37

Hi,

My last 2 commits fix the mentioned bugs. Can you check them, please ?

Thanks,
Best Regards,
LR