fix some bugs when used with form. Only works in Chrome btw