Made sure we are not getting into problems with unclosed forms