Revert "fixed the bug that uses the inverserd logic by mistake."

This reverts commit da0e1ac4b72f57aa27643660d6040658ba3a013c.
fixed the bug that uses the inverserd logic by mistake.