Fix ReferenceError: emerg is not defined, when validateAction() call fail()