fixed some annoying js errors/warnings

Change-Id: I2ab42e8f81381122e7ea37c877e573cecfcfef08
Merge "fixed some annoying js errors/warnings"