issue #1108: modify code