Fixed a few JavaScript warning