fix according to unit tests