Fix bugs relating to setting of process title.