r4795: stronget type checking in composite connect function