The code supposed to remove the trailing slash from the console URL does not work; it results in a runtime error.