Fixed some bugs travisci found