For ENG-5802, fix test bugs