Closes #5

Thanks to @pdugas for reporting and thanks to @dr3mro for the patch.