Fix #376 #377
Merge pull request #470 from scraperwiki/issue-376-377

Fix #376 #377