Minor cleanups; found bug (not yet fixed)