fixed plot update calling wrong function issue