Made getMsg() trim results