Improved test coverage

Same as the above comment.