fixed TypeError issue.
Merge pull request #1 from wistful/master

fixed TypeError issue.