fixed null pointer exception at line 'productIds.add(entry.productEntry.productId)'