fixed error playing out chrome browser and code-optimation