fixed select loop