Fixes #53

@matryer please review and merge.