fixes to icap parsing