bug fixes, prevSelection reset and escape codes in term