Fixed for issue #15 thanks to @danhalligan