coverity + some patch for pp