partly fix issue #3647