Fix id insertion