fix compile error & warning