Fix some bugs in keyphrase