Revert "remove ineffective code"

This reverts commit 40ee6cb8897ee35b006e6b9ab6b31edbd4c1f107.