Fix generics types with the new Serial extension