update charflags to new metatable style