Make the preview button work