Fix tests that fail on Travis