Added compatibility with chrome non ES6