fix bug in contacts and messages and make notification for unread messages