Fix issues with fragments. DB INSERT not working

DB insert doesn't work.