Issue 17 fix

Fix for #17