Fixed scalar functions in the database that deal with URL generation.