Improve hook for Travis CI