Fixes for issue #1