fixed surface calculation bug