fix all unit tests issues