Terminal clears after program is terminated