fix bug for save undo/redo
add search for category
optimaze search for keyword