Fixed platform issues in message class