fix compiler warning and test cleanup