fixed plot errors