Fix pgrep usage logic