Some children's wards 'unfit for purpose'