Fixed bug in reset function after having simplified browser compatibility