Fixing a few issues in bulk insert. Still not working, however