fix compile error and some coding format