Minneapolis homeless shelter avoids closure