Fixes #13 and Fixes #9
Fixes #9