'check-available-stock' fix issue #533