Patched error in simple switch