Fix error in code, remove never executed clause