Fixed non-chrome JS errors