fix remove_pid()