Another logic fix attempt.