Fixes #4 and also resolves #3