Fixes for failing tests on travis