Fix issue #8 and issue #9

Hi,
I have incorporated the fixes required for this addon to start working again.
You will have to modify changelog and bump version numbers.