fix whitelist gen's bugs