fix type with clang fixes a la Gregory