Fixed bugs in emotiondetection