Fix tests on Travis CI