Housing affordability improved in July from June