Fix bug in plotting.