Fixed parsing of 'available' and added a test case.