bug fix, ref #40