fixed some angle logic