fixed bug in firefox, if there was invalid html between <form> and </form> tag