Fix bug with URL shortener code