Fixed the collection pids method