Fix some typescript consistency issues