fix alarm handling
fix alarm handling