fix undefined parameters in viewparams