bug fix - selection var not defined