Fix couple of JS errors