fix generation of alert