Updated the preview to prevent some bug
no document.write