bug fix ref #10