Changed terminal detection logic (from a symmetrical terminal character to arbitrary non-hexadecimal)