Fixed issue with max slots for items

For some reason it wrote 0 because it didn't exist.