Fixing issue #52
Merge branch 'issue_52_fix_type_error'