Fixed bug with trend detection.