fixing bugs

code path never exercised!