Update repositories correctly