Fix py2 to py3 serializer problem