switch branch error