fixed id numbering problem with imported databases