fix checking violations in reachNext
add missing return statement