fixes issue #47, thanks Clement!