Fix issue with test that failed on Travis CI but not locally