fix for lootspawner (undefined variables)