Fixes to typing errors