Added more robust sontext passing.