firmware: Logic error