grand bugfix in pH thread, part 2