manually merge pull request #95 / fixxes issue #23
bugfix provided by @ninniuz