fix #1239
Merge pull request #49 from tbolon/master

fix #1239