More logic fixes to handle product attributes