Fix terminal selecting