Fixed minor issues from unittests