fix problem with enum type in generating diff