Changed service URI generation method to fix exception in production