fix attach failure by trials