Bugfix 1003

Rewrote the code
Merge pull request #1 from AlexRuppert/develop

Bugfix 1003