fix case clause error