adding reset method for errors