Bug Fix in Trend Time Range Checking