why is this script stopping unexpectedly...