backport some toabctl changes