Correct logic messed up in previous commits.