fixed upi code scripts