For ENG-6247, fix test bugs