fix bug with slugifying an array rather than a string