Returning error for prefix already registered

When the `Prefix already registered` error was checked, it was created via fmt.Errorf and immediately discarded, not returned. It's now returned immediately.

ps: it's my first pull request ever, hope I didn't mess up :)