fixing issue_266
Merge pull request #267 from josenavas/issue_266

fixing issue_266
fixed bug introduced by @ElBrogrammer
Merge pull request #270 from gregcaporaso/issue-269

fixed bug introduced by @ElBrogrammer