fixed bug in computeangle for sc