fixed toroidal plotting bug