Fix terminal bug & some tweaks