Fix test bugs.