bug fix, clean up.