fixed line graph drawing multiple times