fixed problem with plot instantiation