Corrected error while plotting all z planes