Fix bugs in metadata page.
Fix the error when no service registry is configured.