Fix two typos + one js integer casting

Change-Id: Ie5c4c39e94e5531dbfa48e8cde7b608967cec0c8