bugfix in plotting