Fix for incorrect use of `DISTINCT` and s/redirect/unauthorized