fix crashing bug on enum params, fixed exampe