Bugfix #105 : TypeError: object of type 'NoneType' has no len()

close #105.