bug fix in record selection from popup window