bug fixed and new func in AppMessage