fix errors from metadata.js move
fix database.url method