TRUNK-2968 fix Javascript error in auto completes when the user makes an invalid selection
Merge pull request #421 from dadepo/TRUNK-2968

Fix Issue TRUNK-2968. Javascript error in auto complete selection.