Fixed #453 and added test cases
Minor adjustments based on feedback
Removed str2bool import
Merge pull request #696 from ayberk/master

Fixed #453 and added test cases