bug fix.

Minor cleanup included.