Pull request #194

This is just pull request #194 cleaned up enough to merge cleanly.