Fix possible memory leak
Updated .travis.yml