fixed minor bug ref #2