Attempt to fix JS errors