Fixes Issue #3 and Issue #6

Fixes Issue #3 and Issue #6