more migration fixes, fix up metrics.js