Fixing Changed replacing nick function so it returns a value on the first occurrence.