fixed problem of failing bulk insertion in DB