Use correct variable when checking if persistence is required