Fix failing tests on Travis