correct small (but harmless) logic error.
(cherry picked from commit ac6f4f8a5672b98e6de350f7949630725be62195)