Fixed undefined input value problem on reset form