now fixed that issue with reset

wrong check in if