Corrected bug of id differences
Now inserting in db