1. Fixed bugs in plotting.