Fixed some minor breakage, including hangs on Travis CI.