Fix some issues detected by Travis CI