fixing alerts bug