JS: Minor changes to types to make compiler happier.