fix test error and failures