fix a bug in nbd