fix build error: panic instead of (unreachable) return