update alert handling to work with ios8