Fix for Issue #237
Fix for Issue #326
Merge pull request #334 from paulej72/master

Fixes for #237 and #326