fix for endpoint detection in serializer