Removed 'unused pid variable' warning