More TypeError fixes