fixed bug in scripting and added weight to items