fix test error and failure