IFNULL test added to make Not Attached values proper