fix test bugs.