Minor changes on program closes