Revert "fix #5963"

This reverts commit df0921b50ca50a27fe8495935810105c41476043.