fix some bugs in plotting framework