fix problem with plot