correctly initialize `types`.