Small error fixed. Script should work now