Fix typing issues