Fixed broken toSlug method. (Fix: #301)