Added close_all_but_initial() function call