fixed python spooler memory leak