fix bug: not eval the script if not append to doc.