I might not have caught that before, but nd is an unsigned int.