Fix bug when overwriting existing serializer.