bug fix and test cleanup