Fix Issue #8, fix Issue #9