bug fix. cleanup.