Merge "Fix bug to break switch cases." into pi-dev