applied John's changes to 2.6 branch