applied cboltz's patch
Merge pull request #1 from tgoettlicher/master

applied cboltz's patch