Prevent leave message on preview script