fix the 'deadlock' big problem finally

because of for switch break only works on switch instead
of for statement