fixes issue #40