Fix git merge 

Fixes type errors caused in checkedMode.
Also fixes a bug in treating shaBytes as shaStrings.