fix unreachable code warning