fix issue 2309
Merge pull request #529 from timrae/issue2309

fix issue 2309