Add a default case, add brackets for case variable scope