fixed pgid issue