fix bug switch case