added ptb3Escaping to handle Unknown Variable errors