             height = max(ceil(rect.height) + (11 * 2), YepConfig.chatCellAvatarSize())
         }
 
-        messageHeights[key] = height
+        if !key.isEmpty {
+            messageHeights[key] = height
+        }
 
         return height
     }


        let key = message.messageID

        if let messageHeight = messageHeights[key] {
            return messageHeight
        }

        var height: CGFloat = 0


                let height = heightOfMessage(message) + 10 // TODO: +10 cell line space

                println("uuheight \(height)")
                newMessagesTotalHeight += height
            }
            
