Fix issue with tmux's parent term setting, and optimized loading