fixed TypeError issue.