Fix some typing issues