Fix for bulk insertion