remove redundant 'break' and fix bug