issue #3539, review and modify