fixed bug in message model