Fixing past due alert query