fix some compiler errors and fix the error in travis-ci