Fix TypeError bug
Merge pull request #14 from maxsnew/typeerror

Fix TypeError bug