Fixed up JS errors