Updated scripts, fixed bug