Corrected a logic error introduced in previous commit.