Fixed function to set terminal title