Bug fixes and metadata upgrade