another mistake fixed in form submit function