square.lua inventory fix