Fix test errors on Travis