Made these changes:

Added data is immediately selected in the select menu and triggers the select action.
Fixed some bugs.