Fixed some TypeScript errors.