Added hardReset helper function.