Revert "fixing core#6765"

This reverts commit 3b128e099492ddb44eb252ffd68a7a370903df71.