Fixes issue #80. Thanks emjotde