Fixed bug with angle and added local