Fix travis config and some tests.