Fix some problems in NameServer tasks.