fix "Illegal offset type" in pending better solution