fix message state being nil when requesting /api/v1/messages?state=unread