Iss59

Fixes #59.

@treyhunner any improvements to do?