Thousands of migrants lose shelter