Change solution handler from before to after closing