fix trend line bug