fixes error when upgrading inventory slot count