fix bugs 1264240, 1264247, 1264239, 1264233 (clang report errors)