Fixed errors with plot definition