fix the script so that it does not leave the old server process hanging around