fixes to ICAP parsing