Should this be block.getTypeId() or rel.getTypeId()?