fixed toSlug js method