small cleanup and bug fix.