fix scope in serializer