Fix syntax errors in format strings