Move travis to osx and fix the nil error