Improve tests so they pass on TravisCI