Added closing of each form after completing it.