fixed unreachable code issue