Fix unit tests and travis