Added unit tests to illustrate an issue as well as provide more code coverage.