Changed the way the preview text is updated.