fix bug caused by weird default 'case' behavior