fixed saving plots