Changed arbitrary time-out to polling.