fix pid free/alloc after Initialize.xml parse