plot script fix