Revert "logic error fixed"

This reverts commit 758392744485cade5d48d652606a83607136f58f.