Fixed incorrect angle calculation.