typecast nids to ints