Update travis config + bug fix in tests