Fixed bugfix #3131: Added break directives to switch statement

Added break directives to switch statement, so that the statement is actually correct as reported in the bug report.