Ensuring types are correctly annotated as shared