fix conditionality uninitialised variable