Fixed pre_bulk_insert issue (#578)