HCOLL-77 some bug fixes but still has bugs