fix datatypes and add collection support in CRATE