fixing issue #40