Fixed switch statements without a default case

Please check my codes.