fixed startsWith incompatiblity with chrome