fix `LocalJumpError` due to early return