fix alarm panel logic