Revert "Revert "Revert "fix a bug"""

This reverts commit b1c976b5e483f574cc291c186a76d28c28f780ec.