fix issue #1315
Merge pull request #1327 from kamilsk/master

fix issue #1315