bug fix where availabilityType id didn't renumber
Merge branch 'john'