some typescript type check fixes