fixed pid generation