Assorted fixes from MBP.