Fix bgtypes.h