Fix for issue 85 (+ see my comments in issue)