Fixed plot script