Removing unwanted spaces
Fixing adapt_to_survey