added proper reset function in case idle gets stuck