fixed bug with reset