Remove unreachable code and quiet dialyzer warning