Revert "bug fix"

This reverts commit 79e3cb9e52e606a0b5c0ee32085ef4965b2e1c18.
Revert "Revert "bug fix""

This reverts commit 86c0f8a2dd9c3be6e649a95820692a072892cefb.