fixes to cmi_library