fixed bug in ortho method