Fix lookup problem and add enter key press handling.