update alert query, and fix sender