[liuxia] Fix issue found by Wang Tao. #1, #2, #3