fixed issue #40

fixed issue #40