Added explicit closing of form - fixes #25