Fix array to string conversion notice
Fix stock checking