Added logic to cope with out of stock parts