fix undefined value for hidden inputs