misc fixes from Stuart's comments

merging again.