Fix poorly formated document