fixed iMessage function

fixed iMessage function