     }
 
     class func heightForContainerWidth(msg: Message, width: CGFloat) -> CGFloat {
-        let text = NSMutableAttributedString(string: msg.msg!)
-        let size = textSizeInWidth(text, width: widthOfText(backgroundWidth: (width * WidthPercentage)))
-        var height = size.height + TimeHeight + TextTopBorder + TextBottomBorder
+        let field = NSTextField(frame: NSZeroRect)
+        field.attributedStringValue = TextMapper.attributedStringForText(msg.msg!, date: false)
+        field.sizeToFit()
+        var height = field.frame.height + TimeHeight + TextTopBorder + TextBottomBorder + 20
         
         if msg.sms! == false && msg.messageparts!.count > 0 {
             var contenttype = 0

                    height: 15
                )
                
                mmsView.frame.origin.x = backgroundView.frame.origin.x + ChatMessageView.TextRoundSideBorder
                mmsView.frame.origin.y = backgroundView.frame.origin.y + ChatMessageView.TextTopBorder - (ChatMessageView.VerticalTextPadding / 2) + 30
            }
        }

                switch(dict.content_type!) {
                case "image/jpeg", "image/jpg", "image/png", "image/gif", "image/bmp":
                    contenttype += 1
                    mmsView.frame = NSMakeRect(0,0,150,150)
                    let imageview = NSImageView(frame: mmsView.frame)
                    mmsView.addSubview(imageview)
                    imageview.imageScaling = .ScaleProportionallyDown
                    
