Fix logic flaw in 7adbf4f