Fix two alert bugs