Fix for Issue #1 and Issue #2