fixed minor issues with preview pane js