additional fixes resulted from tests