fix the "undefined index action" error for unrecognized switches