Merge pull request #1 from DisCODe/master

Fixed infinite loop problem on slower machines.