Few fixes on alert.py