better escaped terp handling