Test fixes, preparing for Travis CI