Improved reset method.