fixed a couple of bugs since changing viewplane made build functions not work properly