Updated script-- trying to fix some dumb problems(tm).