bug fix, ref #6