Optimization metric bug fixes - last commit before systematics show up