Fix logic for recovery variant

Change-Id: Ib737be21f934e4ca449e444061cda99d682257db