Merge pull request #4 from blinkkin/develop

Bugfix: unsigned int cannot hold value of npos, which can be negative.