fix Core.ToLiteral