Fixed javascript error in new version of Chrome