Fix bug with custom item scripts.