fix bug with reset