         
         var index: Int = 0
         
-        if !context.isEmpty {
+        if !context.isEmpty && context != " " && context != "" {
             for key in emojiCodeDict.keys {
                 if key.lowercaseString.rangeOfString(context) != nil {
                     emojiButtons[index].setTitle(emojiCodeDict[key], forState: UIControlState.Normal)

        } else {
            sender.backgroundColor = UIColor(red: (235/255.0), green: (237/255.0), blue: (239/255.0), alpha: 1.0)
        }
        if let text = sender.titleLabel?.text {
            myDelegate.emojiButtonPressed(text)
        }
    }

            }

            emojiButtons[index].setTitle("", forState: UIControlState.Normal)
            emojiButtons[index].titleLabel!.font = UIFont.systemFontOfSize(32.0)
            emojiButtons[index].sizeToFit()
            
            emojiButtons[index].frame = CGRectMake(count,
                emojiButtons[index].frame.minY,
                screenSize.width / CGFloat(buttonCount) - 2.0,
                50.0)
            
            count += screenSize.width / CGFloat(buttonCount)
        }
