fixed add plane code