corrections

corrected Action <-> Message error
refactoring