Fixes for Issue #1 and #2