adding window.plugins fix