Fixed error with not properly removing last url segment
Merge pull request #120 from korczis/master

Fixed error with not properly removing last url segment