fix for z coordinate for position; removed some performance debugging which doesn't need to happen in the editor