bug fix in tests