Improved the check for deciding the availability of a product.