Fix/master/improve coverage

I added tests that will help improve test coverage. This functionality didn't seem to be tested at all, so I added a unit test for it.