fix some test bugs