Tweeked the end time of the loop.