fixing type checkinf of identities