fixed a small logic-error-typo