fix alert loop