fixed some bug in alert setting