fixed startswith incompatiblity with chrome