Fix angle inconsistent issue #1251

this fix the problem, maybe there is other method, but it looks acceptable to me.