small script fix preventing inventory overflow