fix bugs and add travis-ci setting file