fixed wrong alarm deletion code