fixed issue in stop criterion checker