bug in plot error correction